<?
include('db.php');
$content = "<html><head><title>Dumpall :D</title></head><body><div align=center><table><tr><td><table><tr><th>Songid</th><th>Title</th><th>Extension</th><th>Genre</th><th>Submitted</th></tr>";
$query = "SELECT * FROM songlist"; // songid, title, genre, ,extension, submitted
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
    $id = $row['songid'];
    $title = $row['title'];
    $ext = $row['extension'];
    $genre = $row['genre'];
    $sub = $row['submitted'];
    $content = $content . "<tr><td>$id</td><td>$title</td><td>$ext</td><td>$genre</td><td>$sub</td></tr>";
}
$content = $content . "</table></td></tr><tr><td><table><tr><th>Playlist ID</th><th>Playlist Name</th><th>Userid</th><th>Song IDs</th><th>Submitted</th></tr>";
$query = "SELECT * FROM playlists"; // playlistname, songidlist, submitted
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_array($result,MYSQL_ASSOC))
{
    $id = $row['playlistid'];
    $name = $row['playlistname'];
    $list = $row['songidlist'];
    $sub = $row['submitted'];
    $user = $row['userid'];
    $content = $content . "<tr><td>$id</td><td>$name</td><td>$user</td><td>$list</td><td>$sub</td></tr>";
}
$content = $content . "</td></tr></table></div>";
echo $content;
?>